package collection;

import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class ListDemo {
    public static void main(String[] args) {
        List<String> list=new ArrayList<>();
        list.add("one");
        list.add("two");
        list.add("three");
        list.add("four");
        list.add("five");System.out.println("原始数据为:"+list);
        String g=list.get(0);System.out.println(g);
        String s=list.set(1,"six");System.out.println(s);System.out.println("set: "+list);

    }
}
